local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, CommonOHOH.files.BaseComponent());
local MonsterAudioCd=CommonOHOH.config.Game.MonsterAudioCd
local Client_AudioManager = _G.ClientOHOH.load.Client_AudioManager();

function M.new(self,...)
	return M(self,...);
end;


function M.ctor(self, parent)
	M.super.ctor(self, parent);
    
    local hurt=self.parent:WaitForChild_Loop("hurt")
    local die=self.parent:WaitForChild_Loop("die")
    self.HurtAudo= Client_AudioManager:LoadSound(hurt)
    self.DieAudo= Client_AudioManager:LoadSound(die)
    

    self.parent.HurtEvent:Connect(function()
         Client_AudioManager:PlayGloble(self.HurtAudo)
	end)


    self.parent.DieEvent:Connect(function()
        Client_AudioManager:PlayGloble(self.DieAudo)
	end)
	
end;

function M.dtor(self)
	M.super.dtor(self);
end



return M